Everything about Snapshot Computer Storage totally explained
In
computer file systems, a
snapshot is a copy of a set of files and directories as they were at a particular point in the past. The term was coined as an analogy to
that in photography.
Rationale
A full
backup of a large data set may take a long time to complete. On multi-tasking or multi-user systems, there may be writes to that data while it's being backed up. This prevents the backup from being
atomic and introduces a version skew that may result in data corruption. For example, if a user moves a file from a directory that hasn't yet been backed up into a directory that has already been backed up, then that file would be completely missing on the backup media. Version skew may also cause corruption with files which change their size or contents underfoot while being read.
One
approach to safely backing up live data is to temporarily disable write access to data during the backup, either by stopping the accessing applications or by using the
locking API provided by the operating system to enforce exclusive read access. This is tolerable for low-availability systems (on desktop computers and small workgroup servers, on which regular
downtime is acceptable). High-availability
24/7 systems, however, can't bear service stoppages.
To avoid downtime, high-availability systems may instead perform the backup on a
snapshot—a
read-only copy of the data set frozen at a point in time—and allow applications to continue writing to their data. Most snapshot implementations are efficient and can create snapshots in
O(1). In other words, the time and I/O needed to create the snapshot doesn't increase with the size of the data set, whereas the same for a direct backup is proportional to the size of the data set.
Read-write snapshots are sometimes called branching snapshots, because they implicitly create diverging versions of their data. Aside from backups and data recovery, read-write snapshots are frequently used in virtualization, sandboxing and virtual hosting setups because of their usefulness in managing changes to large sets of files.
Implementations
Volume managers
Some Unix systems (including
Linux and
HP-UX) have snapshot-capable
logical volume managers. These implement
copy-on-write on entire
block devices by copying changed blocks—just before they're to be overwritten—to other storage, thus preserving a self-consistent past image of the block device. Filesystems on this image can later be mounted as if it were on read-only media. Block-level snapshotting is almost always less space-efficient than direct file system support for snapshots.
File systems
Some file systems, such as
WAFL,
fossil for
Plan 9 from Bell Labs or
ODS-5, internally track old versions of files and make snapshots available through a special
namespace. Others, like
UFS2, provide an operating system
API for accessing file histories. In
NTFS, access to snapshots is provided by the Volume Shadow Service (VSS) in
Windows XP and
Windows Server 2003 and
Shadow Copy in
Windows Vista. Snapshots have also been available in the NSS (
Novell Storage Services) file system on
Netware since version 4.11, and more recently on
Linux platforms in the
Open Enterprise Server product.
ZFS has a hybrid implementation which tracks read-write snapshots at the block level, but makes branched file sets nameable to user applications as "clones".
Time Machine, included in
Apple's
Mac OS X v10.5 operating system, isn't a snapshotting scheme but a system-level incremental backup service: it merely watches mounted volumes for changes and copies changed files periodically to a specially-designated volume.
In databases
The
SQL specification mandates four levels of
transaction isolation. In the highest,
SERIALIZABLE, a snapshot is implicitly created at the start of every transaction. The backup utilities for many popular SQL databases use this feature to generate self-consistent dumps of table data.
In virtualization
System emulators host a guest operating system in a virtual machine; some (including VMware, Qemu and Virtual PC) can perform whole-system snapshots by dumping the entire machine state to a backing file and redirecting future guest writes to a second file, which then acts as a copy-on-write table.
Other applications
Software transactional memory is a scheme which applies the same concepts to data structures held only in memory.
Further Information
Get more info on 'Snapshot Computer Storage'.
|
External Link Exchanges
Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:
<a href="http://snapshot__computer_storage.totallyexplained.com">Snapshot (computer storage) Totally Explained</a>
Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned. |